//
//  URLRequest.h
//  Hangxin
//
//  Created by wang fengquan on 7/2/11.
//  Copyright 2011 company. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "IRequest.h"



@interface URLRequest : NSObject 


@property(nonatomic,weak) id<IRequest> delegate;
@property(nonatomic,strong) NSURLConnection *connection;
@property(nonatomic,strong) NSMutableData *responseData;

- (id)initWithURL:(NSString *)urlString andDelegate:(id<IRequest>)urlDelegate;
-(id)initWithPostURL:(NSString *)urlString andDelegate:(id <IRequest>)urlDelegate andPostData:(NSMutableDictionary *)params andFile:(NSMutableDictionary *)fileDictory;//异步操作

-(id)postWithUrl:(NSString*)url fileds:(NSMutableDictionary *)fieldParams  andFile:(NSMutableDictionary *)fileparam;//同步操作
- (void)cancelConnection;
- (void)startLoadData;

@end

